package com.woniuxy.woniuticket.movieinfomodule.dao;

import com.woniuxy.woniuticket.pojo.ProblemOfFeedback;
import org.apache.ibatis.annotations.*;
import java.util.List;
@Mapper
public interface ProblemOfFeedbackDAO {
    //插入反馈信息
    @Insert("insert into t_problem_of_feedback(solveTheProgress,problemInfo,problemImg) values('正在处理',#{problemInfo},#{problemImg})")
    void insertProblem(ProblemOfFeedback problemOfFeedback);
    //批量删除反馈信息通过id
    @Delete({
            "<script>",
            "delete from t_problem_of_feedback where problemId in ",
            "<foreach collection='problemIds' item='id' index='index' separator=',' open='(' close=')'>",
            "#{id}",
            "</foreach>",
            "</script>"
    })
    void deleProblemByIds(@Param("problemIds") Integer[] problemIds);
    //单个删除
    @Delete("delete from t_problem_of_feedback where problemId = #{problemId}")
    void deleProlemBySingleId(Integer problemId);
    @Select("select solveTheProgress from t_problem_of_feedback where problemId = #{problemId}")
    String  queryProbleById(Integer problemId);

    //更新反馈列表信息
    @Update("update t_problem_of_feedback set solveTheProgress = #{solveTheProgress} where problemId = #{problemId}")
    void updatePro(ProblemOfFeedback problemOfFeedback);

    //更新反馈列表信息
    @Update("update t_problem_of_feedback set solveTheProgress = '已经处理' where problemId = #{problemId}")
    void updateProById(Integer problemId);
    //查询所有反馈信息
    @Select("select * from t_problem_of_feedback")
    List<ProblemOfFeedback> qureyAllProblem();

    /*@Select({
            "<script>",
            "select e.*,d.deptno 'dept.deptno' ,d.dname 'dept.dname' from emp e left join dept d on e.deptno = d.deptno",
            "<where>",
            "<if text='ve.ename != null and  !=ve.ename'>" ,
            "and e.ename like concat('%',#{ve.ename},'%')",
            "</if>",
            "<if text='ve.begin != null'>" ,
            "and e.hiredate <![CDATA[>=]] #{ve.begin}",
            "</if>",
            "<if text='ve.end != null'>" ,
            "and e.hiredate <![CDATA[<=]] #{ve.end}",
            "</if>",
            "</where>",
            "</script>"
    })
    public List<ProblemOfFeedback> queryAllMessage(@Param("pageNum") Integer pageNum, @Param("pageSize")Integer pageSize, @Param("vo") ProblemVo vo);*/




}
